package com.woniuxy.driverschool.mapper;



import com.woniuxy.driverschool.entity.BatchCompleteStatus;
import com.woniuxy.driverschool.entity.Student;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 学员数据访问层
 * @author shkstart
 * @create 2021-09-29 10:27
 */

public interface StudentMapper {
//    添加学员
    void insertStudent(Student student);
    //修改学员注册状态和时间
    void updateStudentRegisterDate ( @Param("register") String register,@Param("regisDate")Date regisDate,@Param("sid")Integer sid);
    //单个修改学员结业状态和时间
    void updateStudentCompleteStatusDate ( @Param("completeStatus") String completeStatus,@Param("completeDate")Date completeDate,@Param("sid")Integer sid);

    //class Aaa{String a,Stirng b,int c}
    //List<Aaa>
    //批量修改学员结业状态和时间
    void updateListStudentCompleteStatusDate (List<BatchCompleteStatus> batchCompleteStatus);
    //删除学员
    void deleteStudentById(Integer sid);
    //根据id修改学员
    void updateStudentById(Student student);
    //用id查询学员
    Student selectStudentBySid(Integer sid);
    //分页查询信息
    List<Student> selectStudentsByPage(@Param("student")Student student, @Param("pageIndex")Integer pageIndex,@Param("pageSize") Integer pageSize,
                                       @Param("startTime") Date startTime,@Param("endTime") Date endTime,
                                       @Param("completeStartTime") Date completeStartTime,@Param("completeEndTime") Date completeEndTime);
    //学员总条数
    int selectCountStudentsByPage(@Param("student")Student student, @Param("startTime") Date startTime,@Param("endTime") Date endTime,
                                  @Param("completeStartTime") Date completeStartTime,@Param("completeEndTime") Date completeEndTime);
}
